Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update hashcode to always generate a positive index #967

Merged
merged 2 commits into from
Feb 11, 2015
Merged

Conversation

catsby
Copy link
Contributor

@catsby catsby commented Feb 11, 2015

When generating an int index for Set, we need to ensure that hash.String returns a positive integer.

import (
"hash/crc32"
)
import "hash/crc32"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stylewise I usually just prefer to use the parens, because it makes it easy to add imports later, despite being not the most optimal way (visually) to put it.

@mitchellh
Copy link
Contributor

Style nitpicks but looks great. Can you also mention the issue # this fixes? (the route53 thing)

@catsby
Copy link
Contributor Author

catsby commented Feb 11, 2015

@mitchellh updated to fix nitpicks. There was no original issue for this; I was trying to work on something mostly unrelated and ran into it

@mitchellh
Copy link
Contributor

@clint I thought this fixed the route53 issue though? Oh, that was a new one you found?

@mitchellh
Copy link
Contributor

This LGTM. Merge! 🚢

@catsby
Copy link
Contributor Author

catsby commented Feb 11, 2015

@mitchellh I was trying to work on something and add a new acceptance test, but the existing one(s) didn't pass. With this, the acceptance tests pass now.

@catsby catsby merged commit 5602348 into master Feb 11, 2015
@mitchellh mitchellh deleted the hashcode-fix branch February 11, 2015 21:15
@ggiamarchi
Copy link
Contributor

It actually fix the issue #873 😸

@catsby
Copy link
Contributor Author

catsby commented Feb 11, 2015

@ggiamarchi well then, hooray I'm helping! 😄

@ghost
Copy link

ghost commented May 3, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators May 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants